package com.yzc.android.network.response;

import android.os.Parcel;

import com.google.gson.annotations.SerializedName;

/**
 * Created by yzc on 16/5/5.
 */
public class SectionDataResponse implements android.os.Parcelable {
    public static int kDataTypeMulti = 1;
    public static int kDataTypeScroll = 2;
    public static int kDataTypeLoadMore = 3;
    public static int kDataTypeDrag = 4;

    @SerializedName("mId")
    public String mId;

    @SerializedName("mContent")
    public String mContent;

    @SerializedName("mImageUrl")
    public String mImageUrl;

    @SerializedName("mType")
    public int mType;

    @SerializedName("mSectionBean")
    public SectionInfoResponse mSectionBean;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.mId);
        dest.writeString(this.mContent);
        dest.writeString(this.mImageUrl);
        dest.writeInt(this.mType);
        dest.writeParcelable(this.mSectionBean, flags);
    }

    public SectionDataResponse() {
    }

    protected SectionDataResponse(Parcel in) {
        this.mId = in.readString();
        this.mContent = in.readString();
        this.mImageUrl = in.readString();
        this.mType = in.readInt();
        this.mSectionBean = in.readParcelable(SectionDataResponse.class.getClassLoader());
    }

    public static final Creator<SectionDataResponse> CREATOR = new Creator<SectionDataResponse>() {
        @Override
        public SectionDataResponse createFromParcel(Parcel source) {
            return new SectionDataResponse(source);
        }

        @Override
        public SectionDataResponse[] newArray(int size) {
            return new SectionDataResponse[size];
        }
    };
}
